<!DOCTYPE html>
<html>
<head>
<title>req_assign</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<link rel="stylesheet" type="text/css"
	href="/codebase/fonts/font_roboto/roboto.css" />
<link rel="stylesheet" type="text/css" href="/codebase/dhtmlx.css" />
<script type="text/javascript" src="/codebase/dhtmlx.js" />
<style>
</style>
<script>
	var myForm, myGrid,my_form_btn;
	function doOnLoad() {
		//alert("onload req assign");
		
		//grid setup
		if (myGrid) {
			myGrid.clearAll(true);
		}
		myGrid = new dhtmlXGridObject("grid_team_list");
		//myGrid.loadStruct("/common/testmanager/req_list.xml");
		myGrid.setImagePath("/codebase/imgs/");

		myGrid.setHeader("Req ID,项目主题,填报人,项目角色,类型,领取时间,成员,监理,需求技术负责人,项目状态,项目节点,项目志/周报");
		myGrid.setInitWidths("50,100,100,150,150,150,150,150,150,150,150,200");
		myGrid.setColAlign("center,left,left,left,left,left,left,left,left,left,left,left");
		myGrid.setColTypes("ro,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed");
		myGrid.setColSorting("int,str,str,str,str,str,str,str,str,str,str,str");
		//myGrid.setColumnIds("first,second");
		myGrid.xml.top = "mytop";
		myGrid.xml.row = "./myrow";
		//myGrid.enableAutoWidth(true);
		//myGrid.enableAutoHeight(true);
		myGrid.init();
		//myGrid.load("/common/testmanager/req_trace_test_data.xml","xml");
		myGrid.load("/req/req_trace_grid","json");
		

		// button setup
		formStructure=null;
		formStructure=[
		               {type:"button",name:"export_excel_btn",value:"导出excel"}
		             //  {type:"newcolumn"},
		               //{type:"button",name:"export_btn_2",value:"导出excel测试"}
			               ];
		
		if (myForm) {
			myForm.unload();
			myForm = null;
		}
		myForm = new dhtmlXForm("form_btn");
		myForm.loadStruct(formStructure);
		
		myForm.attachEvent("onButtonClick", function(name) {
			if (name == "export_excel_btn") {
				//myGrid.toExcel('/ExcelGenerator');		
				
				window.location.href = '/ExcelGenerator_req_projec_trace';
			}	
			/* if (name == "export_btn_2") {
				//myForm.send('/ExcelGenerator_test_info_sum');
				window.location.href = '/ExcelGenerator_test_info_sum?test_id=16';
			} */
			
		});
	}
	
	
</script>
</head>
<body onload="doOnLoad();">
	<table>
		<tr>
			<td>
				<div id="form_req_base_info"></div>
			</td>
		</tr>
		<tr>
			<td>

				<div id="grid_team_list"
					style="width: 700px; height: 400px; background-color: white;">
				</div>
			</td>
		</tr>
				<tr>
			<td>

				<div id="form_btn">
				</div>
			</td>
		</tr>
	</table>
</body>
</html>